import java.security.spec.RSAOtherPrimeInfo;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;

public class Test1 {
    public static void main(String[] args) {
       BinaryTree binaryTree = new BinaryTree();
       BinaryTree.TreeNode root = binaryTree.createTree();
        System.out.println("前序遍历");
        binaryTree.preOrder(root);
        System.out.println();
        System.out.println("中序遍历");
        binaryTree.inOrder(root);
        System.out.println();
        System.out.println("后序遍历");
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println("层序遍历");
        binaryTree.levelOrder1(root);
        System.out.println();
        System.out.println("获取节点的个数：子问题的思路");
        System.out.println(binaryTree.size2(root));

        System.out.println("获取叶子节点的个数：子问题");
        System.out.println(binaryTree.getLeafNodeCount2(root));
        System.out.println("获取二叉树的高度");
        System.out.println(binaryTree.getHeight(root));


    }

}
